package command;

import java.sql.Connection;
import javax.servlet.http.*;

import org.apache.log4j.Logger;

import db.QueryManager;
import db.DAO;

/**
 * Command 기능을 하는 추상클래스.
 * @author (주)열음소프트
 * @version 1.0
 */
public abstract class Command {

	protected static Logger logger  = Logger.getLogger("command");

  /**
   * Command 기능을 수행하는 Method.
   * 
   * @param req HttpServletRequest: req
   * @exception CommandException
   */
  public abstract String execute(HttpServletRequest req)
    throws CommandException;
  
	protected void saveLog(Connection con,String user_id,String work_text) throws Exception{
		String queryStr = QueryManager.getQuery("edu0113_insert.query");
		String[] param= new String[2];
		param[0] = user_id;
		param[1] = work_text;
		DAO.callProcedure(con,queryStr,param);
	}
}

